package cn.ms.doctor.Entity;

import java.io.Serializable;
import java.math.BigDecimal;
import lombok.Data;

/**
 * 
 * @TableName doctor_drugs
 */
@Data
public class Drugs implements Serializable {
    /**
     * 药品id
     */
    private Integer drugsId;

    /**
     * 药品名称
     */
    private String drugsName;

    /**
     * 药品描述
     */
    private String drugsContent;

    /**
     * 药品生产企业
     */
    private String drugsCom;

    /**
     * 生产地址
     */
    private String drugsAddress;

    /**
     * 价格
     */
    private BigDecimal drugsPrice;

    /**
     * 库存数
     */
    private Long drugsCount;

    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Drugs other = (Drugs) that;
        return (this.getDrugsId() == null ? other.getDrugsId() == null : this.getDrugsId().equals(other.getDrugsId()))
            && (this.getDrugsName() == null ? other.getDrugsName() == null : this.getDrugsName().equals(other.getDrugsName()))
            && (this.getDrugsContent() == null ? other.getDrugsContent() == null : this.getDrugsContent().equals(other.getDrugsContent()))
            && (this.getDrugsCom() == null ? other.getDrugsCom() == null : this.getDrugsCom().equals(other.getDrugsCom()))
            && (this.getDrugsAddress() == null ? other.getDrugsAddress() == null : this.getDrugsAddress().equals(other.getDrugsAddress()))
            && (this.getDrugsPrice() == null ? other.getDrugsPrice() == null : this.getDrugsPrice().equals(other.getDrugsPrice()))
            && (this.getDrugsCount() == null ? other.getDrugsCount() == null : this.getDrugsCount().equals(other.getDrugsCount()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getDrugsId() == null) ? 0 : getDrugsId().hashCode());
        result = prime * result + ((getDrugsName() == null) ? 0 : getDrugsName().hashCode());
        result = prime * result + ((getDrugsContent() == null) ? 0 : getDrugsContent().hashCode());
        result = prime * result + ((getDrugsCom() == null) ? 0 : getDrugsCom().hashCode());
        result = prime * result + ((getDrugsAddress() == null) ? 0 : getDrugsAddress().hashCode());
        result = prime * result + ((getDrugsPrice() == null) ? 0 : getDrugsPrice().hashCode());
        result = prime * result + ((getDrugsCount() == null) ? 0 : getDrugsCount().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", drugsId=").append(drugsId);
        sb.append(", drugsName=").append(drugsName);
        sb.append(", drugsContent=").append(drugsContent);
        sb.append(", drugsCom=").append(drugsCom);
        sb.append(", drugsAddress=").append(drugsAddress);
        sb.append(", drugsPrice=").append(drugsPrice);
        sb.append(", drugsCount=").append(drugsCount);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}